package com.base.cn.platform.os.service.manage.marketing.shortLink;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 短链接加密Controller
 *
 * @author zsw
 * @since 2019-04-22
 */
@FeignClient(value = BaseService.appName,configuration = FeignAuthConfig.class)
public interface ShortLinkService extends BaseService {

    /**
     * 查询链接
     *
     * @param shortLink
     * @return
     */
    @RequestMapping(contextPath + "/queryShortLink")
    List<Map<String,Object>> queryShortLink(@RequestBody Map<String, Object> shortLink);

    /**
     * 生成短链接
     *
     * @param longUrl 长链接
     * @return String
     */
    @RequestMapping(contextPath + "/createShortLink")
    Map<String,Object> createShortLink(@RequestParam("longUrl") String longUrl);

}
